package by.home;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Set;

public class ChatRoom implements Serializable {
  private int id;
  private String header;
  private Date date;
  private Set<Message> messages = null;
  private Set<Integer> onlineUsers = null;
  private int version;

  public ChatRoom() {
  }

  public ChatRoom(String header) {
    this.header = header;
    this.date = new Date();
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getHeader() {
    return header;
  }

  public void setHeader(String header) {
    this.header = header;
  }


  public Set<Message> getMessages() {
    return messages;
  }

  public void setMessages(Set<Message> messages) {
    this.messages = messages;
  }

  public Set<Integer> getOnlineUsers() {
    return onlineUsers;
  }

  public void setOnlineUsers(Set<Integer> onlineUsers) {
    this.onlineUsers = onlineUsers;
  }

  public int getVersion() {
    return version;
  }

  public void setVersion(int version) {
    this.version = version;
  }

  public Date getDate() {
    return date;
  }

  public void setDate(Date date) {
    this.date = date;
  }
}
